<template>
    <div id="pdfDom1">
      <!-- 孕期营养处方 -->
      <div style="">
        <div style=" width: 100%; background-color:#2ab28b;  text-align: center; margin:auto">
          <div style="font-size: 40px; font-weight: bold; color: #ffffff;padding-top:20px;">{{ Titlename }}</div>
          <!-- <span style="font-size: 30px; color: #666666; margin-left: 20px;display: block;">基本信息报告</span> -->
          <div style="margin-top:30px;font-size: 24px;padding-bottom: 20px;font-weight: bold;color:#333333;">儿童营养风险筛查报告单
          </div>
        </div>
      </div>
      <div style="width: 100%; height: 40px; background-color: #2AB28B; margin-top: 10px; display: flex;">
            <div><img src="../assets/img/12.jpg" style="height: 40px" alt="" /></div>
            <div style="font-size: 20px; margin-left: 10px; line-height: 40px; color: #fff;">儿童基本信息</div>
          </div>
          <div
          style="width: 1070px; border-top: 2px solid #09a578; border-right: 2px solid #09a578;  margin-top: 10px;font-size: 18px;"
          v-if="times == 2">
          <div style="display: flex;width: 100%;">
            <div style="width: 100%;display: flex;">
                <div
                style="background-color: #2AB28B; width: 20%;height: 40px;text-align: center;line-height: 40px;color: #fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
                检测日期</div>
              <div style="width: 80%; height: 40px; border-bottom: 2px solid #09a578; line-height: 40px; text-indent: 20px;border-right: 2px solid #09a578;">
                {{ report_time }}
              </div>
            </div>
            <div style="width: 100%;display: flex;">
              <div
              style="background-color: #2AB28B; width: 20%;height: 40px;text-align: center;line-height: 40px;color: #fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              年龄</div>
            <div style="width: 80%; height: 40px; border-bottom: 2px solid #09a578; line-height: 40px; text-indent: 20px;">
              {{ userinfo.birth }}
            </div>
          </div>

          </div>
          <div style="display: flex">
            <div
              style="background-color: rgb(42, 178, 139); width: 10%;height: 40px;text-align: center;line-height: 40px;color: #fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              儿童姓名
            </div>
            <div
              style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              {{ contents.username ?? '[]' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%; height: 40px; text-align: center; line-height: 40px; color:#fff; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578;">
              性别
            </div>
            <div
              style="width: 15%; height: 40px; text-align: center;line-height: 40px;border-right: 2px solid #09a578; border-bottom: 2px solid #09a578;">
              {{ contents.sex == 1 ? '女' : '男' ?? '[]' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139); width: 10%; height: 40px; text-align: center; line-height: 40px; color:#fff; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578;">
              出生日期
            </div>
            <div
              style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              {{ birth ?? '[]' }}
            </div>
            <div
              style=" background-color: rgb(42, 178, 139); width: 10%; height: 40px; text-align: center; line-height: 40px;color:#fff; border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              监护人姓名
            </div>
            <div style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-bottom: 2px solid #09a578;">
              {{ contents.guardian_name ?? '[]' }}
            </div>
          </div>
          <div style="display: flex">
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              监护人手机
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.guardian_mobile ?? '[]' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              身高
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.height ? contents.height + 'CM' : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              体重
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #white; border-bottom: 2px solid #09a578; ">
              {{ contents.weight ? contents.weight + 'KG' : '' }}
            </div>
            <div
              style="width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid white;border-bottom: 2px solid #09a578;">
            </div>
            <div style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-bottom: 2px solid #09a578;">
            </div>
          </div>
        </div>
        <div style="width: 1070px; border-top: 2px solid #09a578; border-right: 2px solid #09a578;  margin-top: 10px"
          v-if="times == 1">
          <div style="display: flex">
            <div
              style="background-color: #2AB28B; width: 9.9%;height: 40px;text-align: center;line-height: 40px;color: #fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              检测日期</div>
            <div style="width: 90%; height: 40px; border-bottom: 2px solid #09a578; line-height: 40px; text-indent: 20px;">
              {{ report_time }}
            </div>
          </div>
          <div style="display: flex">
            <div
              style="background-color: rgb(42, 178, 139); width: 10%;height: 40px;text-align: center;line-height: 40px;color: #fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              儿童姓名
            </div>
            <div
              style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              {{ contents.username ?? '[]' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%; height: 40px; text-align: center; line-height: 40px; color:#fff; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578;">
              性别
            </div>
            <div
              style="width: 15%; height: 40px; text-align: center;line-height: 40px;border-right: 2px solid #09a578; border-bottom: 2px solid #09a578;">
              {{ contents.sex == 1 ? '女' : '男' ?? '[]' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139); width: 10%; height: 40px; text-align: center; line-height: 40px; color:#fff; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578;">
              出生日期
            </div>
            <div
              style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              {{ birth ?? '[]' }}
            </div>
            <div
              style=" background-color: rgb(42, 178, 139); width: 10%; height: 40px; text-align: center; line-height: 40px;color:#fff; border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              监护人姓名
            </div>
            <div style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-bottom: 2px solid #09a578;">
              {{ contents.guardian_name ?? '[]' }}
            </div>
          </div>
          <div style="display: flex">
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              监护人手机号
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.guardian_mobile ?? '[]' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              身高
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.height ? contents.height + 'CM' : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              体重
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.weight ? contents.weight + 'KG' : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              头围
            </div>
            <div style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-bottom: 2px solid #09a578;">
              {{ contents.touwei ? contents.touwei + 'CM' : '' }}
            </div>
          </div>
          <div style="display: flex">
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              出生身长
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.chushengsg ? contents.chushengsg + 'CM' : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              出生体重
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.chushengtz ? contents.chushengtz + 'KG' : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              腹围
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.fuwei ? contents.fuwei + 'CM' : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              血型
            </div>
            <div style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-bottom: 2px solid #09a578;">
              {{ contents.xuexing_value ? contents.xuexing_value : '' }}
            </div>
          </div>
          <div style="display: flex">
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              民族
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.minzu_value ? contents.minzu_value : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              与监护人关系
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.guanxi_value ? contents.guanxi_value : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              家长受教育程度
            </div>
            <div
              style=" width: 15%; height: 40px; text-align: center; line-height: 40px; border-right: 2px solid #09a578; border-bottom: 2px solid #09a578; ">
              {{ contents.jiaoyu_value ? contents.jiaoyu_value : '' }}
            </div>
            <div
              style="background-color: rgb(42, 178, 139);width: 10%;height: 40px;text-align: center; line-height: 40px;color:#fff;border-right: 2px solid #09a578;border-bottom: 2px solid #09a578;">
              出生情况
            </div>
            <div style="width: 15%;height: 40px;text-align: center;line-height: 40px;border-bottom: 2px solid #09a578;">
              {{ contents.birthSituation_value ? contents.birthSituation_value : '' }}
            </div>
          </div>
        </div>
        <!-- <div style="" v-if="monthsDifference>=36">
          <div style=" width: 100%; background-color:#2ab28b;  text-align: center; margin:auto">
            <div style="font-size: 40px; font-weight: bold; color: #ffffff;padding-top:20px;">{{ Titlename }}</div>
            <span style="font-size: 30px; color: #666666; margin-left: 20px;display: block;">基本信息报告</span>
            <div
              style="margin-top:30px;font-size: 24px;padding-bottom: 20px;font-weight: bold;padding-top: 20px;color:#333333;">
              儿童体质测评分析报告单</div>
          </div>
        </div> -->
        <!-- 体成分数据分析 -->
        <!-- <div style="width: 100%;height: 40px;background-color: rgb(42, 178, 139);margin-top: 10px;display: flex;" v-if="monthsDifference>=36">
          <div><img src="../assets/img/13.jpg" style="height: 40px" alt="" /></div>
          <div style="font-size: 20px;margin-left: 10px;line-height: 40px;color:#fff;">
            体成分数据分析
          </div>
        </div>
        <ChildViewcomposition v-if="monthsDifference>=36"></ChildViewcomposition> -->

        <!-- 儿童膳食结构(FFQ)与膳食分析报告单 -->
        <!-- <div :style="monthsDifference>=36?'page-break-before: always;':''"></div> -->
          <div >
        <!-- <div> -->
          <div style=" width: 100%; background-color:#2ab28b;  text-align: center; margin:auto">
            <!-- <div style="font-size: 40px; font-weight: bold; color: #ffffff;padding-top:20px;">{{ Titlename }}</div> -->
            <!-- <span style="font-size: 30px; color: #666666; margin-left: 20px;display: block;">基本信息报告</span> -->
            <div
              style="margin-top:30px;font-size: 24px;padding-bottom: 20px;font-weight: bold;padding-top: 20px;color:#333333;">
              儿童膳食结构(FFQ)与膳食分析报告单</div>
          </div>
        </div>
        <ChildViewDietary></ChildViewDietary>
        <!-- 膳食结构分析 -->
        <div
        style="width: 100%;height: 40px;background-color: rgb(42, 178, 139); margin:auto;margin-top: 20px;display: flex;">
        <div><img src="../assets/img/19.jpg" style="height: 40px" alt="" /></div>
        <div style="font-size: 20px;margin-left: 10px;line-height: 40px;color:#fff;">
          膳食结构分析(日均值)
        </div>
      </div>
      <div
      style="width:1071px;margin:20px auto;border:2px solid #09a578;text-align:center;line-height:40px;font-size: 16px;">
      <div style="display:flex;">
        <div class="biao1" style="width:14.5%">膳食结构</div>

        <div class="biao7"
          :style="item.product_energy < item.systam_down ? 'color:red' : item.product_energy >= item.systam_down && item.product_energy <= item.systam_up ? 'color:black' : 'color:red'"
          v-for="(item, index) in pagoda" :key="index" style="width:14.5%">{{ item.title == undefined
            ? '' : item.product_energy < item.systam_down ? '▼' + item.title : item.product_energy >= item.systam_down &&
              item.product_energy <= item.systam_up ? '✔' + item.title : '▲' + item.title }} </div>
        </div>
        <div style="display:flex;">
          <div class="biao1" style="width:14.5%">推荐(g)</div>
          <div class="biao7" v-for="(item, index) in pagoda" :key="index" style="width:14.5%">{{
            item.title == undefined ? '' : item.systam_down + '~' + item.systam_up }}</div>
        </div>
        <div style="display:flex;">
          <div class="biao5" style="width:14.5%">实际</div>
          <div class="biao7" v-for="(item, index) in pagoda" :key="index" style="width:14.5%">{{
            item.title == undefined ? '' : Math.floor(item.product_energy * 100) / 100 }}
          </div>
        </div>
        <div style="display:flex;">
          <div class="biao5" style="width:14.5%">占比</div>
          <div class="biao7" v-for="(item, index) in pagoda" :key="index" style="width:14.5%">
            <!-- {{ item.title==undefined?'':item.product_energy==0? 0+'%':item.product_energy>item.systam_down && item.product_energy< item.systam_up? 100+'%' : item.product_energy<item.systam_down? '-'+ Math.floor((((item.systam_down-item.product_energy)/item.systam_down)*100)*100)/100 +'%' : item.product_energy>item.systam_up? '+'+ Math.floor((((item.product_energy-item.systam_down)/item.systam_down)*100)*100)/100 +'%':''}} -->
            {{ item.product_energy < item.systam_down ? Math.floor((item.product_energy - item.systam_down) /
              item.systam_down * 100 * 100) / 100 + '%' : item.product_energy >= item.systam_down &&
                item.product_energy <= item.systam_up ? 100 + '%' : item.product_energy > item.systam_up ? '+' +
                  Math.floor(((item.product_energy - item.systam_up) / item.systam_up + 1) * 100 * 100) / 100 + '%' : ''
            }}
          </div>
        </div>
      </div>


        <!-- 一日三餐供能比 -->
        <div style="page-break-before: always;">
          <div style=" width: 100%; background-color:#2ab28b;  text-align: center; margin:auto">
            <!-- <div style="font-size: 40px; font-weight: bold; color: #ffffff;padding-top:20px;">{{ Titlename }}</div> -->
            <!-- <span style="font-size: 30px; color: #666666; margin-left: 20px;display: block;">基本信息报告</span> -->
            <div
              style="margin-top:30px;font-size: 24px;padding-bottom: 20px;font-weight: bold;padding-top: 20px;color:#333333;">
              一日三餐供能比</div>
          </div>
        </div>
        <div
        style="width:1071px;margin:20px auto;border:2px solid #09a578;text-align:center;line-height:40px;font-size: 16px;">
        <div style="display:flex;">
          <div class="biao7" v-for="(item, index) in Catering" :key="index" style="width:25%">{{ item }} </div>
          </div>
          <div style="display:flex;">
            <div class="biao1" style="width:25%">测评能量(kcal)</div>
            <div class="biao7"  :key="index" style="width:25%">{{Math.floor(Breakfastenergy * 100) / 100 }}</div>
            <div class="biao7"  :key="index" style="width:25%">{{Math.floor(Lunchenergy * 100) / 100}}</div>
            <div class="biao7"  :key="index" style="width:25%">{{Math.floor(Dinnerenergy * 100) / 100}}</div>
          </div>
          <div style="display:flex;">
            <div class="biao1" style="width:25%">推荐能量(kcal)</div>
            <div class="biao7"  :key="index" style="width:25%">{{Math.floor(BreakfastrecommendationMin * 100) / 100 + '~'+ Math.floor(BreakfastrecommendationMax * 100) / 100}}</div>
            <div class="biao7"  :key="index" style="width:25%">{{Math.floor(LunchrecommendationsMin * 100) / 100 + '~'+ Math.floor(LunchrecommendationsMax * 100) / 100}}</div>
            <div class="biao7"  :key="index" style="width:25%">{{Math.floor(DinnerrecommendationMin * 100) / 100 + '~'+ Math.floor(DinnerrecommendationMax * 100) / 100}}</div>
          </div>
          <div style="display:flex;">
            <div class="biao1" style="width:25%">推荐能量占比(%)</div>
            <div class="biao7"  :key="index" :style="Breakfastenergy<BreakfastrecommendationMin?'width:25%;color:red;':Breakfastenergy>BreakfastrecommendationMax?'width:25%;color:orange;':'width:25%;'">{{Breakfastenergy<BreakfastrecommendationMin? Math.floor((Breakfastenergy-BreakfastrecommendationMin)/BreakfastrecommendationMin*100)+'%' : Breakfastenergy>=BreakfastrecommendationMin && Breakfastenergy<=BreakfastrecommendationMax? 100+'%': Math.floor((Breakfastenergy-BreakfastrecommendationMax)/BreakfastrecommendationMax*100+100)+'%'}}</div>
            <div class="biao7"  :key="index" :style="Lunchenergy<LunchrecommendationsMin?'width:25%;color:red;':Lunchenergy>LunchrecommendationsMax?'width:25%;color:orange;':'width:25%;'">{{Lunchenergy<LunchrecommendationsMin? Math.floor((Lunchenergy-LunchrecommendationsMin)/LunchrecommendationsMin*100)+'%' : Lunchenergy>=LunchrecommendationsMin && Lunchenergy<=LunchrecommendationsMax? 100+'%': Math.floor((Lunchenergy-LunchrecommendationsMax)/LunchrecommendationsMax*100+100)+'%'}}</div>
            <div class="biao7"  :key="index" :style="Dinnerenergy<DinnerrecommendationMin?'width:25%;color:red;':Dinnerenergy>DinnerrecommendationMax?'width:25%;color:orange;':'width:25%;'">{{Dinnerenergy<DinnerrecommendationMin? Math.floor((Dinnerenergy-DinnerrecommendationMin)/DinnerrecommendationMin*100)+'%' : Dinnerenergy>=DinnerrecommendationMin && Dinnerenergy<=DinnerrecommendationMax? 100+'%': Math.floor((Dinnerenergy-DinnerrecommendationMin)/DinnerrecommendationMax*100+100)+'%'}}</div>
          </div>
          <div style="display:flex;">
            <div class="biao1" style="width:25%">一日能量占比(%)</div>
            <div class="biao7"  :key="index" style="width:25%;">{{(Math.floor(Breakfastenergy/(Breakfastenergy+Lunchenergy+Dinnerenergy)*100 * 100) / 100 + '%')}}</div>
            <div class="biao7"  :key="index" style="width:25%;">{{(Math.floor(Lunchenergy/(Breakfastenergy+Lunchenergy+Dinnerenergy)*100 * 100) / 100 + '%')}}</div>
            <div class="biao7"  :key="index" style="width:25%;">{{(Math.floor(Dinnerenergy/(Breakfastenergy+Lunchenergy+Dinnerenergy)*100 * 100) / 100 + '%')}}</div>
          </div>
          <div class="biao1" style="width:100%;" v-if="BreakfastList.length>0">早餐</div>
          <!-- <div style="display:flex;" v-if="BreakfastLists>1">
           <div class="biao7" v-for="(item, index) in element1" :key="index" style="width:5.8%;">{{ item }} </div>
          </div>
          <div style="display:flex;" v-if="BreakfastLists>1">
            <div class="biao7"  :key="index" style="white-space: nowrap;overflow: hidden; ">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
             {{item.food_name}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.energy}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.protein}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.carbohydrate}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.fat}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.calcium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.sodium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.magnesium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.iron}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.zinc}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.selenium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.vitamin_a}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.vitamin_e}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.vitamin_b1}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.vitamin_b2}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.vitamin_c}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in BreakfastList" :key="index">
               {{item.num}}
              </div>
            </div>
          </div> -->
          <el-table :data="BreakfastList" border  style="width: 100%;" v-if="BreakfastList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="energy" :label="element1[1]"  width="100"/>
            <el-table-column prop="protein" :label="element1[2]" width="100" />
            <el-table-column prop="carbohydrate" :label="element1[3]" width="100" />
            <el-table-column prop="fat" :label="element1[4]" width="100" />
            <el-table-column prop="calcium" :label="element1[5]" width="100" />
            <el-table-column prop="sodium" :label="element1[6]"  width="100"/>
            <el-table-column prop="magnesium" :label="element1[7]" width="100" />
            <el-table-column prop="iron" :label="element1[8]"  width="120"/>
        
          </el-table>
           <el-table :data="BreakfastList" border   style="width: 100%;margin-bottom: 5px;" v-if="BreakfastList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="zinc" :label="element1[9]"  width="100"/>
            <el-table-column prop="selenium" :label="element1[10]" width="100" />
            <el-table-column prop="vitamin_a" :label="element1[11]" width="100" />
            <el-table-column prop="vitamin_e" :label="element1[12]" width="100" />
            <el-table-column prop="vitamin_b1" :label="element1[13]"  width="100"/>
            <el-table-column prop="vitamin_b2" :label="element1[14]" width="100" />
            <el-table-column prop="vitamin_c" :label="element1[15]" width="100" />
            <el-table-column prop="num" :label="element1[16]" width="120" />
          </el-table>
          <!-- 早加餐 -->
          <div class="biao1" style="width:100%;" v-if="BreakfastAddList.length>0">早加餐</div>
            <el-table :data="BreakfastAddList" border  style="width: 100%;" v-if="BreakfastAddList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="energy" :label="element1[1]"  width="100"/>
            <el-table-column prop="protein" :label="element1[2]" width="100" />
            <el-table-column prop="carbohydrate" :label="element1[3]" width="100" />
            <el-table-column prop="fat" :label="element1[4]" width="100" />
            <el-table-column prop="calcium" :label="element1[5]" width="100" />
            <el-table-column prop="sodium" :label="element1[6]"  width="100"/>
            <el-table-column prop="magnesium" :label="element1[7]" width="100" />
            <el-table-column prop="iron" :label="element1[8]"  width="120"/>
        
          </el-table>
           <el-table :data="BreakfastAddList" border   style="width: 100%;margin-bottom: 5px;" v-if="BreakfastAddList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="zinc" :label="element1[9]"  width="100"/>
            <el-table-column prop="selenium" :label="element1[10]" width="100" />
            <el-table-column prop="vitamin_a" :label="element1[11]" width="100" />
            <el-table-column prop="vitamin_e" :label="element1[12]" width="100" />
            <el-table-column prop="vitamin_b1" :label="element1[13]"  width="100"/>
            <el-table-column prop="vitamin_b2" :label="element1[14]" width="100" />
            <el-table-column prop="vitamin_c" :label="element1[15]" width="100" />
            <el-table-column prop="num" :label="element1[16]" width="120" />
          </el-table>
          <!-- 午餐 -->
          <div class="biao1" style="width:100%;" v-if="LunchList.length>0">午餐</div>
          <!-- <div style="display:flex;" v-if="LunchLists>1">
           <div class="biao7" v-for="(item, index) in element1" :key="index" style="width:20%;">{{ item }} </div>
          </div>
          <div style="display:flex;" v-if="LunchLists>1">
            <div class="biao7"   :key="index" style="white-space: nowrap;overflow: hidden;"><div class="biao7" v-for="(item,index) in LunchList" :key="index">
              {{item.food_name}}
              </div>
            </div>
            <div class="biao7"   :key="index" style="width:5.8%;"><div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.energy}}
              </div>
            </div>
            <div class="biao7"   :key="index" style="width:5.8%;"><div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.protein}}
              </div>
            </div>
            <div class="biao7"   :key="index" style="width:5.8%;"><div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.carbohydrate}}
              </div>
            </div>
            <div class="biao7"   :key="index" style="width:5.8%;"><div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.fat}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.calcium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.sodium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.magnesium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.iron}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.zinc}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.selenium}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.vitamin_a}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.vitamin_e}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.vitamin_b1}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.vitamin_b2}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.vitamin_c}}
              </div>
            </div>
            <div class="biao7"  :key="index" style="width:5.8%;">
              <div class="biao7" v-for="(item,index) in LunchList" :key="index">
               {{item.num}}
              </div>
            </div>
          </div> -->
          <el-table :data="LunchList" border  style="width: 100%;"  v-if="LunchList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="energy" :label="element1[1]"  width="100"/>
            <el-table-column prop="protein" :label="element1[2]" width="100" />
            <el-table-column prop="carbohydrate" :label="element1[3]" width="100" />
            <el-table-column prop="fat" :label="element1[4]" width="100" />
            <el-table-column prop="calcium" :label="element1[5]" width="100" />
            <el-table-column prop="sodium" :label="element1[6]"  width="100"/>
            <el-table-column prop="magnesium" :label="element1[7]" width="100" />
            <el-table-column prop="iron" :label="element1[8]"  width="100"/>
        
          </el-table>
           <el-table :data="LunchList" border  style="width: 100%;margin-bottom: 5px;"  v-if="LunchList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="zinc" :label="element1[9]"  width="100"/>
            <el-table-column prop="selenium" :label="element1[10]" width="100" />
            <el-table-column prop="vitamin_a" :label="element1[11]" width="100" />
            <el-table-column prop="vitamin_e" :label="element1[12]" width="100" />
            <el-table-column prop="vitamin_b1" :label="element1[13]"  width="100"/>
            <el-table-column prop="vitamin_b2" :label="element1[14]" width="100" />
            <el-table-column prop="vitamin_c" :label="element1[15]" width="100" />
            <el-table-column prop="num" :label="element1[16]" width="100" />
          </el-table>
          <!-- 午加餐 -->
          <div class="biao1" style="width:100%;" v-if="LunchAddList.length>0">午加餐</div>
            <el-table :data="LunchAddList" border  style="width: 100%;" v-if="LunchAddList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="energy" :label="element1[1]"  width="100"/>
            <el-table-column prop="protein" :label="element1[2]" width="100" />
            <el-table-column prop="carbohydrate" :label="element1[3]" width="100" />
            <el-table-column prop="fat" :label="element1[4]" width="100" />
            <el-table-column prop="calcium" :label="element1[5]" width="100" />
            <el-table-column prop="sodium" :label="element1[6]"  width="100"/>
            <el-table-column prop="magnesium" :label="element1[7]" width="100" />
            <el-table-column prop="iron" :label="element1[8]"  width="120"/>
        
          </el-table>
           <el-table :data="LunchAddList" border   style="width: 100%;margin-bottom: 5px;" v-if="LunchAddList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="zinc" :label="element1[9]"  width="100"/>
            <el-table-column prop="selenium" :label="element1[10]" width="100" />
            <el-table-column prop="vitamin_a" :label="element1[11]" width="100" />
            <el-table-column prop="vitamin_e" :label="element1[12]" width="100" />
            <el-table-column prop="vitamin_b1" :label="element1[13]"  width="100"/>
            <el-table-column prop="vitamin_b2" :label="element1[14]" width="100" />
            <el-table-column prop="vitamin_c" :label="element1[15]" width="100" />
            <el-table-column prop="num" :label="element1[16]" width="120" />
          </el-table>
          <!-- 晚餐 -->
          <div class="biao1" style="width:100%;" v-if="DinnerList.length>0">晚餐</div>
          <el-table :data="DinnerList" border  style="width: 100%;" v-if="DinnerList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="energy" :label="element1[1]"  width="100"/>
            <el-table-column prop="protein" :label="element1[2]" width="100" />
            <el-table-column prop="carbohydrate" :label="element1[3]" width="100" />
            <el-table-column prop="fat" :label="element1[4]" width="100" />
            <el-table-column prop="calcium" :label="element1[5]" width="100" />
            <el-table-column prop="sodium" :label="element1[6]"  width="100"/>
            <el-table-column prop="magnesium" :label="element1[7]" width="100" />
            <el-table-column prop="iron" :label="element1[8]"  width="100"/>
        
          </el-table>
           <el-table :data="DinnerList" border  style="width: 100%;margin-bottom: 5px;" v-if="DinnerList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="zinc" :label="element1[9]"  width="100"/>
            <el-table-column prop="selenium" :label="element1[10]" width="100" />
            <el-table-column prop="vitamin_a" :label="element1[11]" width="100" />
            <el-table-column prop="vitamin_e" :label="element1[12]" width="100" />
            <el-table-column prop="vitamin_b1" :label="element1[13]"  width="100"/>
            <el-table-column prop="vitamin_b2" :label="element1[14]" width="100" />
            <el-table-column prop="vitamin_c" :label="element1[15]" width="100" />
            <el-table-column prop="num" :label="element1[16]" width="100" />
          </el-table>
          <!-- 晚加餐 -->
          <div class="biao1" style="width:100%;" v-if="DinnerAddList.length>0">晚加餐</div>
            <el-table :data="DinnerAddList" border  style="width: 100%;" v-if="DinnerAddList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="energy" :label="element1[1]"  width="100"/>
            <el-table-column prop="protein" :label="element1[2]" width="100" />
            <el-table-column prop="carbohydrate" :label="element1[3]" width="100" />
            <el-table-column prop="fat" :label="element1[4]" width="100" />
            <el-table-column prop="calcium" :label="element1[5]" width="100" />
            <el-table-column prop="sodium" :label="element1[6]"  width="100"/>
            <el-table-column prop="magnesium" :label="element1[7]" width="100" />
            <el-table-column prop="iron" :label="element1[8]"  width="120"/>
        
          </el-table>
           <el-table :data="DinnerAddList" border   style="width: 100%;margin-bottom: 5px;" v-if="DinnerAddList.length>0">
            <el-table-column prop="food_name" :label="element1[0]" width="250" />
            <el-table-column prop="zinc" :label="element1[9]"  width="100"/>
            <el-table-column prop="selenium" :label="element1[10]" width="100" />
            <el-table-column prop="vitamin_a" :label="element1[11]" width="100" />
            <el-table-column prop="vitamin_e" :label="element1[12]" width="100" />
            <el-table-column prop="vitamin_b1" :label="element1[13]"  width="100"/>
            <el-table-column prop="vitamin_b2" :label="element1[14]" width="100" />
            <el-table-column prop="vitamin_c" :label="element1[15]" width="100" />
            <el-table-column prop="num" :label="element1[16]" width="120" />
          </el-table>
        </div>

     
    <!-- 一周膳食清单 -->
    <!-- <div style="
    width: 100%;
    height: 40px;
    background-color: rgb(42, 178, 139);
    margin-top: 300px;
    display: flex;
    page-break-before: always;
  ">
  <div>
    <img src=".././assets/img/23.jpg" style="height: 40px" alt="" />
  </div>
  <div style="
      font-size: 20px;
      margin-left: 10px;
      line-height: 40px;
      color: #fff;
    ">
    一周膳食清单
  </div>
</div> -->
        <div style="page-break-before: always;">
          <div style=" width: 100%; background-color:#2ab28b;  text-align: center; margin:auto">
            <!-- <div style="font-size: 40px; font-weight: bold; color: #ffffff;padding-top:20px;">{{ Titlename }}</div> -->
            <!-- <span style="font-size: 30px; color: #666666; margin-left: 20px;display: block;">基本信息报告</span> -->
            <div
              style="margin-top:30px;font-size: 24px;padding-bottom: 20px;font-weight: bold;padding-top: 20px;color:#333333;">
              一周膳食清单</div>
          </div>
        </div>
<div style="width: 99%;margin-left:10px;margin-top:10px;padding:20px 0px;"> 
    <div v-for="item in diet_analysis" :key="item">
        <div style="height:40px;line-height: 40px;width: 100%;text-align: center;border:2px solid #09a578;background-color: #09a578;color:#fff;font-size: 20px;font-weight: bold;">
          {{ item.pName }}
        </div>
        <div>
          <div style="font-size:18px;border: 2px solid #09a578;display: flex;height:40px;line-height: 40px;">
           <div style="border-right: 2px solid #09a578;width: 20%;text-align: center;">
            早餐7:00
           </div>
            <span v-for="breakfast in item.早餐" :key="breakfast" style="margin-left: 20px;">
              <o class="" style="font-size:18px;" v-if="breakfast.food_name">{{ breakfast.food_name }}</o> 
              <o class="" style="font-size:18px;" v-if="breakfast.food_name">重量:{{breakfast.weight}}g;</o> 
            </span>
          </div>
          <div style="font-size:18px;display: flex;height:40px;line-height: 40px;border: 2px solid #09a578;">
            <div style="border-right: 2px solid #09a578;width: 20%;text-align: center;">
              早点10:00
            </div>
            <span v-for="earlier in item.早点" :key="earlier" style="margin-left: 20px;">
              <o class="" style="font-size:18px;" v-if="earlier.food_name">{{ earlier.food_name }}</o>
              <o class="" style="font-size:18px;" v-if="earlier.food_name">重量:{{ earlier.weight }}g;</o>
            </span>
          </div>
        </div>
        <div style="font-size:18px;display: flex;height:40px;line-height: 40px;border: 2px solid #09a578;">
            <div style="border-right: 2px solid #09a578;width: 20%;text-align: center;">
              午餐12:00
            </div>
            <span v-for="lunch in item.午餐" :key="lunch" style="margin-left: 20px;">
              <o class="" style="font-size:18px;" v-if="lunch.food_name">{{ lunch.food_name }}</o> 
              <o class="" style="font-size:18px;" v-if="lunch.food_name">重量:{{  lunch.weight}}g;</o> 
            </span>
          </div>
          <div style="font-size:18px;display: flex;height:40px;line-height: 40px;border: 2px solid #09a578;">
            <div style="border-right: 2px solid #09a578;width: 20%;text-align: center;">
              午点15:00
            </div>
            <span v-for="noon in item.午点" :key="noon" style="margin-left: 20px;">
              <o class="" style="font-size:18px;" v-if="noon.food_name">{{ noon.food_name }}</o> 
              <o class="" style="font-size:18px;" v-if="noon.food_name">重量:{{ noon.weight }}g;</o>
            </span>
          </div>
          <div style="font-size:18px;display: flex;height:40px;line-height: 40px;border: 2px solid #09a578;">
            <div style="border-right: 2px solid #09a578;width: 20%;text-align: center;">
              晚餐18:00
            </div>
            <span v-for="dinner in item.晚餐" :key="dinner" style="margin-left: 20px;">
              <o class="" style="font-size:18px;" v-if="dinner.food_name">{{ dinner.food_name }}</o>
              <o class=""  style="font-size:18px;" v-if="dinner.food_name">重量:{{ dinner.weight}}g;</o>
            </span>
          </div>
          <div style="font-size:18px;display: flex;height:40px;line-height: 40px;border: 2px solid #09a578;">
            <div style="border-right: 2px solid #09a578;width: 20%;text-align: center;"> 
              晚点21:00
            </div>
            <span v-for="late in item.晚点" :key="late" style="margin-left: 20px;">
              <o class="" style="font-size:18px;" v-if="late.food_name">{{ late.food_name }}</o> 
              <o class="" style="font-size:18px;" v-if="late.food_name">重量:{{late.weight }}g;</o>
            </span>
          </div>
    </div>
</div>
<!-- <div style="border: 2px solid #09a578; width: 98%;margin-left:10px;margin-top:10px;">
  <div class="dietOn" v-for="item in diet_analysis" :key="item">
    <div class="time-botton">
      <img src=".././assets/img/evaluaction_service_icon.png" alt="" style="width: 15px; height: 15px" />
      {{ item.pName }}
    </div>
    <div style="display: flex;margin-top:20px;">
      <div class="plates" style="margin-left: 10px">
        <div class="time-type time-left-color">早餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="breakfast in item.早餐" :key="breakfast">
              <div :class="breakfast.meal_image == undefined ? 'state1' : 'state2'">
                <img v-if="breakfast.meal_image" :src="'http://' + baseUrl + '/' + breakfast.meal_image" alt=""
                  style="width: 100%; height: 100%" />
              </div>

            </span>
            <span class="plates-top-img" v-for="earlier in item.早点" :key="earlier"><img v-if="earlier.meal_image"
                :src="'http://' + baseUrl + '/' + earlier.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
          </div>
        </div>
        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div style="font-size:18px;">
            早餐7:00:
            <span v-for="breakfast in item.早餐" :key="breakfast">
              <o class="foodsNames" style="font-size:18px;" v-if="breakfast.food_name">{{ breakfast.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="breakfast.food_name">重量:{{breakfast.weight}}g;</o> 
            </span>
          </div>
          <div style="font-size:18px;">
            早点10:00:
            <span v-for="earlier in item.早点" :key="earlier">
              <o class="foodsNames" style="font-size:18px;" v-if="earlier.food_name">{{ earlier.food_name }}</o>
              <o class="foodsNames" style="font-size:18px;" v-if="earlier.food_name">重量:{{ earlier.weight }}g;</o>
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-common-color">午餐</div>
        <div class="der">
          <div style="">
            <span class="plates-top-img" v-for="lunch in item.午餐" :key="lunch"><img v-if="lunch.meal_image"
                :src="'http://' + baseUrl + '/' + lunch.meal_image" alt="" style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="noon in item.午点" :key="noon"><img v-if="noon.meal_image"
                :src="'http://' + baseUrl + '/' + noon.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div style="font-size:18px;">
            午餐12:00:
            <span v-for="lunch in item.午餐" :key="lunch">
              <o class="foodsNames" style="font-size:18px;" v-if="lunch.food_name">{{ lunch.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="lunch.food_name">重量:{{  lunch.weight}}g;</o> 
            </span>
          </div>
          <div style="font-size:18px;">
            午点15:00:
            <span v-for="noon in item.午点" :key="noon">
              <o class="foodsNames" style="font-size:18px;" v-if="noon.food_name">{{ noon.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="noon.food_name">重量:{{ noon.weight }}g;</o>
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-right-color">晚餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="dinner in item.晚餐" :key="dinner"><img v-if="dinner.meal_image"
                :src="'http://' + baseUrl + '/' + dinner.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="late in item.晚点" :key="late"><img v-if="late.meal_image"
                :src="'http://' + baseUrl + '/' + late.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div style="font-size:18px;">
            晚餐18:00:
            <span v-for="dinner in item.晚餐" :key="dinner">
              <o class="foodsNames" style="font-size:18px;" v-if="dinner.food_name">{{ dinner.food_name }}</o>
              <o class="foodsNames"  style="font-size:18px;" v-if="dinner.food_name">重量:{{ dinner.weight}}g;</o>
            </span>
          </div>
          <div style="font-size:18px;">
            晚点21:00:
            <span v-for="late in item.晚点" :key="late">
              <o class="foodsNames" style="font-size:18px;" v-if="late.food_name">{{ late.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="late.food_name">重量:{{late.weight }}g;</o>
            </span>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div style="border: 2px solid #09a578; width: 98%;margin-left:10px;margin-top:10px;page-break-before: always;">
  <div class="dietOn" v-for="item in diet_analysis1" :key="item">
    <div class="time-botton">
      <img src=".././assets/img/evaluaction_service_icon.png" alt="" style="width: 15px; height: 15px" />
      {{ item.pName }}
    </div>
    <div style="display: flex;margin-top:20px;">
      <div class="plates" style="margin-left: 10px">
        <div class="time-type time-left-color">早餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="breakfast in item.早餐" :key="breakfast">
              <div :class="breakfast.meal_image == undefined ? 'state1' : 'state2'">
                <img v-if="breakfast.meal_image" :src="'http://' + baseUrl + '/' + breakfast.meal_image" alt=""
                  style="width: 100%; height: 100%" />
              </div>

            </span>
            <span class="plates-top-img" v-for="earlier in item.早点" :key="earlier"><img v-if="earlier.meal_image"
                :src="'http://' + baseUrl + '/' + earlier.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
          </div>
        </div>
        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div style="font-size:18px;">
            早餐7:00:
            <span v-for="breakfast in item.早餐" :key="breakfast">
              <o class="foodsNames" style="font-size:18px;" v-if="breakfast.food_name">{{ breakfast.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="breakfast.food_name">重量:{{breakfast.weight}}g;</o> 
              
            </span>
          </div>
          <div style="font-size:18px;">
            早点10:00:
            <span v-for="earlier in item.早点" :key="earlier">
              <o class="foodsNames" style="font-size:18px;" v-if="earlier.food_name">{{ earlier.food_name }}</o>
              <o class="foodsNames" style="font-size:18px;" v-if="earlier.food_name">重量:{{ earlier.weight }}g;</o>
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-common-color">午餐</div>
        <div class="der">
          <div style="">
            <span class="plates-top-img" v-for="lunch in item.午餐" :key="lunch"><img v-if="lunch.meal_image"
                :src="'http://' + baseUrl + '/' + lunch.meal_image" alt="" style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="noon in item.午点" :key="noon"><img v-if="noon.meal_image"
                :src="'http://' + baseUrl + '/' + noon.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div style="font-size:18px;">
            午餐12:00:
            <span v-for="lunch in item.午餐" :key="lunch">
              <o class="foodsNames" style="font-size:18px;" v-if="lunch.food_name">{{ lunch.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="lunch.food_name">重量:{{  lunch.weight}}g;</o> 
            </span>
          </div>
          <div style="font-size:18px;">
            午点15:00:
            <span v-for="noon in item.午点" :key="noon">
              <o class="foodsNames" style="font-size:18px;" v-if="noon.food_name">{{ noon.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="noon.food_name">重量:{{ noon.weight }}g;</o>
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-right-color">晚餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="dinner in item.晚餐" :key="dinner"><img v-if="dinner.meal_image"
                :src="'http://' + baseUrl + '/' + dinner.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="late in item.晚点" :key="late"><img v-if="late.meal_image"
                :src="'http://' + baseUrl + '/' + late.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div style="font-size:18px;">
            晚餐18:00:
            <span v-for="dinner in item.晚餐" :key="dinner">
              <o class="foodsNames" style="font-size:18px;" v-if="dinner.food_name">{{ dinner.food_name }}</o>
              <o class="foodsNames"  style="font-size:18px;" v-if="dinner.food_name">重量:{{ dinner.weight}}g;</o>
            </span>
          </div>
          <div style="font-size:18px;">
            晚点21:00:
            <span v-for="late in item.晚点" :key="late">
              <o class="foodsNames" style="font-size:18px;" v-if="late.food_name">{{ late.food_name }}</o> 
              <o class="foodsNames" style="font-size:18px;" v-if="late.food_name">重量:{{late.weight }}g;</o>
            </span>
          </div>
        </div>
      </div>
    </div>
  </div>
</div> -->
<!-- <div style="margin-left:10px;margin-top:20px;">
  <div class="dietOn" v-for="item in diet_analysis1" :key="item">
    <div class="time-botton">
      <img src=".././assets/img/evaluaction_service_icon.png" alt="" style="width: 15px; height: 15px" />
      {{ item.pName }}
    </div>
    <div style="display: flex;margin-top:20px;">
      <div class="plates" style="margin-left: 10px">
        <div class="time-type time-left-color">早餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="breakfast in item.早餐" :key="breakfast">
              <div :class="breakfast.meal_image == undefined ? 'state1' : 'state2'">
                <img v-if=" breakfast.meal_image" :src="'http://' + baseUrl + '/' + breakfast.meal_image" alt=""
                  style="width: 100%; height: 100%" />
              </div>

            </span>
            <span class="plates-top-img" v-for="earlier in item.早点" :key="earlier"><img v-if="earlier.meal_image"
                :src="'http://' + baseUrl + '/' + earlier.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
          </div>
        </div>
        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div>
            早餐7:00:
            <span v-for="breakfast in item.早餐" :key="breakfast">
              <o class="foodsNames" v-if="breakfast.food_name">{{ breakfast.food_name }}</o>
              <o class="foodsNames" v-if="breakfast.food_name"> 重量:{{ breakfast.weight }}g;</o>
            </span>
          </div>
          <div>
            早点10:00:
            <span v-for="earlier in item.早点" :key="earlier">
              <o class="foodsNames" v-if="earlier.food_name">{{ earlier.food_name }}</o> 
              <o class="foodsNames" v-if="earlier.food_name">重量:{{earlier.weight }}g;</o>  
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-common-color">午餐</div>
        <div class="der">
          <div style="">
            <span class="plates-top-img" v-for="lunch in item.午餐" :key="lunch"><img v-if="lunch.meal_image"
                :src="'http://' + baseUrl + '/' + lunch.meal_image" alt="" style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="noon in item.午点" :key="noon"><img v-if="noon.meal_image"
                :src="'http://' + baseUrl + '/' + noon.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div>
            午餐12:00:
            <span v-for="lunch in item.午餐" :key="lunch">
              <o class="foodsNames" v-if="lunch.food_name ">{{ lunch.food_name }}</o> 
              <o class="foodsNames" v-if="lunch.food_name "> 重量:{{ lunch.weight }}g;</o> 
            </span>
          </div>
          <div>
            午点15:00:
            <span v-for="noon in item.午点" :key="noon">
              <o class="foodsNames" v-if="noon.food_name">{{ noon.food_name }}</o> 
              <o class="foodsNames" v-if="noon.food_name">重量:{{noon.weight}}g;</o> 
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-right-color">晚餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="dinner in item.晚餐" :key="dinner"><img v-if=" dinner.meal_image"
                :src="'http://' + baseUrl + '/' + dinner.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="late in item.晚点" :key="late"><img v-if="late.meal_image"
                :src="'http://' + baseUrl + '/' + late.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div>
            晚餐18:00:
            <span v-for="dinner in item.晚餐" :key="dinner">
              <o class="foodsNames" v-if="dinner.food_name">{{ dinner.food_name }}</o> 
              <o class="foodsNames" v-if="dinner.food_name">重量:{{ dinner.weight }}g;</o> 
            </span>
          </div>
          <div>
            晚点21:00:
            <span v-for="late in item.晚点" :key="late">
              <o class="foodsNames" v-if="late.food_name">{{ late.food_name }}</o> 
              <o class="foodsNames" v-if="late.food_name"> 重量:{{late.weight}}g;</o> 
            </span>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div style="margin-left:10px;margin-top:20px;">
  <div class="dietOn" v-for="item in diet_analysis2" :key="item">
    <div class="time-botton">
      <img src=".././assets/img/evaluaction_service_icon.png" alt="" style="width: 15px; height: 15px" />
      {{ item.pName }}
    </div>
    <div style="display: flex;margin-top:20px;">
      <div class="plates" style="margin-left: 10px">
        <div class="time-type time-left-color">早餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="breakfast in item.早餐" :key="breakfast">
              <div :class="breakfast.meal_image == undefined ? 'state1' : 'state2'">
                <img v-if="breakfast.meal_image" :src="'http://' + baseUrl + '/' + breakfast.meal_image" alt=""
                  style="width: 100%; height: 100%" />
              </div>

            </span>
            <span class="plates-top-img" v-for="earlier in item.早点" :key="earlier"><img v-if="earlier.meal_image"
                :src="'http://' + baseUrl + '/' + earlier.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
          </div>
        </div>
        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div>
            早餐7:00:
            <span v-for="breakfast in item.早餐" :key="breakfast">
              <o class="foodsNames" v-if="breakfast.food_name">{{ breakfast.food_name }}</o> 
              <o class="foodsNames" v-if="breakfast.food_name">重量:{{breakfast.weight }}g;</o>
            </span>
          </div>
          <div>
            早点10:00:
            <span v-for="earlier in item.早点" :key="earlier">
              <o class="foodsNames" v-if="earlier.food_name">{{ earlier.food_name }}</o> 
              <o class="foodsNames" v-if="earlier.food_name"> 重量:{{earlier.weight}}g;</o> 
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-common-color">午餐</div>
        <div class="der">
          <div style="">
            <span class="plates-top-img" v-for="lunch in item.午餐" :key="lunch"><img v-if="lunch.meal_image"
                :src="'http://' + baseUrl + '/' + lunch.meal_image" alt="" style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="noon in item.午点" :key="noon"><img v-if="noon.meal_image"
                :src="'http://' + baseUrl + '/' + noon.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div>
            午餐12:00:
            <span v-for="lunch in item.午餐" :key="lunch">
              <o class="foodsNames" v-if="lunch.food_name">{{ lunch.food_name }}</o> 
              <o class="foodsNames" v-if="lunch.food_name">重量:{{  lunch.weight }}g;</o> 
            </span>
          </div>
          <div>
            午点15:00:
            <span v-for="noon in item.午点" :key="noon">
              <o class="foodsNames" v-if="noon.food_name">{{ noon.food_name }}</o> 
              <o class="foodsNames" v-if="noon.food_name">  重量:{{ noon.weight }}g;</o> 
            </span>
          </div>
        </div>
      </div>

      <div class="plates">
        <div class="time-type time-right-color">晚餐</div>
        <div class="der">
          <div style="margin-left: 6%; padding-top: 6%">
            <span class="plates-top-img" v-for="dinner in item.晚餐" :key="dinner"><img v-if="dinner.meal_image"
                :src="'http://' + baseUrl + '/' + dinner.meal_image" alt=""
                style="width: 100%; height: 100%" /></span>
            <span class="plates-top-img" v-for="late in item.晚点" :key="late"><img v-if="late.meal_image"
                :src="'http://' + baseUrl + '/' + late.meal_image" alt="" style="width: 100%; height: 100%" /></span>
          </div>
        </div>

        <div class="platesFoods">
          <div>大小：{{ item.multiple }}倍</div>
          <div>
            晚餐18:00:
            <span v-for="dinner in item.晚餐" :key="dinner">
              <o class="foodsNames" v-if="dinner.food_name">{{ dinner.food_name }}</o> 
              <o class="foodsNames" v-if="dinner.food_name">重量:{{  dinner.weight }}g;</o> 
            </span>
          </div>
          <div>
            晚点21:00:
            <span v-for="late in item.晚点" :key="late">
              <o class="foodsNames" v-if="late.food_name">{{ late.food_name }}</o>
              <o class="foodsNames" v-if="late.food_name">重量:{{late.weight }}g;</o>
            </span>
          </div>
        </div>
      </div>
    </div>
  </div>
</div> -->
 <!-- 生长发育曲线图 -->
 <!-- <div style="">
  <div style=" width: 100%; background-color:#2ab28b;  text-align: center; margin:auto">
    <div
      style="margin-top:30px;font-size: 24px;padding-bottom: 20px;font-weight: bold;padding-top: 20px;color:#333333;">
      儿童生长发育曲线图</div>
  </div>
</div>
<div style="display:flex;border: 2px solid #09a578;margin-top:20px">
  <div id="myChart1" :style="{ width: '33%', height: '550px', }"></div>
  <div id="myChart2" :style="{ width: '33%', height: '550px', }"></div>
  <div id="myChart3" :style="{ width: '33%', height: '550px', }"></div>
</div>
<div style="border: 2px solid #09a578;margin-top:20px;font-size: 14px;">
  <div style="margin-top:5px;margin-left: 5px;">BMI值：{{BMI<18.5?'偏瘦':BMI<24 && BMI>=18.5?'正常':BMI<28 && BMI>=24?'偏胖':BMI>=28?'肥胖':''}}</div>
  <div style="margin-top:5px;margin-left: 5px;">建议：{{BMI<18.5?'可以选择富含蛋白质、脂肪和碳水化合物的食物，如瘦肉、鱼类、坚果、全谷物和奶制品。同时，多吃蔬菜和水果，以确保摄入足够的维生素和矿物质。':BMI<24 && BMI>=18.5?'':BMI<28 && BMI>=24?'避免高热量、高脂肪食物，选择清淡、易消化的食物，如新鲜水果、蔬菜，同时搭配适量的肉类和主食、适当运动':BMI>=28?'控制总热量摄入，减少高热量、高脂肪和高糖分食物的摄入，如炸鸡、薯条、糖果等、增加蔬菜、水果和全谷物的摄入，提供足够的膳食纤维和营养素':''}}</div>
  <div style="margin-top:5px;margin-left: 5px;">身高：{{Height_s<contents.height?'偏高':'偏低'}}</div>
  <div style="margin-top:5px;margin-left: 5px;">建议：{{Height_s<contents.height?'身高偏高的人往往需要的能量也相对较高，但并不意味着可以无限制地摄入食物。建议定时定量进食，避免暴饮暴食，并根据个人的能量需求调整饮食量。':'保证充足的钙质摄入，如牛奶、酸奶、奶酪、小鱼干、豆腐、绿叶蔬菜等。增加蛋白质的摄入，建议适量增加瘦肉、鱼、禽类、豆类、蛋类等富含优质蛋白质的食物的摄入。'}}</div>
  <div style="margin-top:5px;margin-left: 5px;">体重：{{contents.weight>Weight_s?'偏重':'偏轻'}}</div>
  <div style="margin-top:5px;margin-left: 5px;margin-bottom: 5px;">建议：{{contents.weight>Weight_s?'减少高热量食物的摄入，特别是高糖、高脂肪和高盐的食物、多吃新鲜蔬菜和水果，提供足够的膳食纤维和维生素、适量运动。':'优先选择富含蛋白质、脂肪和碳水化合物的食物，如瘦肉、鱼类、禽类、全脂奶制品、坚果和种子等'}}</div>
</div> -->
<div v-if="code_1=='true'" style="margin-top: 20px;height:150px;text-align: end;margin-right: 50px;margin-bottom:10px;">
  <img style="width: 100px;height:100px;" :src="'http://' + baseUrl + '/' +codeimg" alt="">
  <div style="margin-top:10px;font-size: 20px;font-weight: bold;">
    扫码关注公众号,获取在线报告
  </div>
</div>
</div>
  </template>
    
  <script setup>
  import { Edit, CirclePlus, Search, Expand, } from '@element-plus/icons-vue'
  import { defineComponent, onMounted, ref, watch, reactive } from 'vue'
  import Header from './common/Header.vue';
  import ChildLeft from './common/ChildLeft.vue';
  import { useRoute, useRouter } from "vue-router"
  import ChildViewcomposition from './common/ChildViewcomposition.vue';
  import http, { baseUrl } from "../utils/http";
  import Drawer from './common/Drawer.vue';
  import ChildViewDietary from './common/ChildVD1.vue';
  import { ElMessage, ElMessageBox } from "element-plus";
  import * as api from "../api/loginHttp";
  import * as echarts from 'echarts';
  const route = useRoute()
  const code_1 = ref(false)
  const router = useRouter()
  const diet_analysis = ref({})
  const diet_analysis1 = ref({})
  const myChart = ref()
const myChart1 = ref()
const myChart2 = ref()
  const labName = ref()
  const options = ref([{
    value: '早餐',
    label: '早餐',
  },
  {
    value: '中餐',
    label: '中餐',
  },
  {
    value: '晚餐',
    label: '晚餐',
  },])
  const checkList = ref([])
  const tan = ref(true)
  const loadings = ref(true)
  const list = ref({})
  const Catering=ref(['','早餐','午餐','晚餐'])
const element1=ref(['菜名','能量','蛋白质','碳水化合物','脂肪','钙','钠','镁','铁','锌','硒','维生素A','维生素E','维生素B1','维生素B2','维生素C','份数']);
  const codeimg=ref()
  const energy = ref(0)
  const energys = ref()
  const OilEnergy = ref(0)
  const drawer = ref(false)
  
const BreakfastLists=ref([])
const LunchLists=ref([])
const DinnerLists=ref([])
const pagoda = ref({})
  const Diseaseanalysis=ref()
  const radio1 = ref('')
  const radio2 = ref('')
  const times=ref()
  const radio3 = ref('')
  const radio4 = ref('')
  const total = ref(0)
  const userinfo = ref({})
  const Prints = ref('true')
  const Titlename = ref()
  const contents = ref({})
  const reportId = ref();
  const username = ref();
  const guardian = ref();
  const birth = ref();
  const birthStatus = ref();
  const report_time = ref();
  const foodIntervention=ref();
  const monthsDifference=ref();
  const Breakfastenergy=ref(0);//早餐能量
const Morningenergy=ref(0);//早点能量
const Lunchenergy=ref(0);//午餐能量
const Noonenergy=ref(0);//午点能量
const Dinnerenergy=ref(0);//晚餐能量
const Lateenergy=ref(0);//晚点能量
const BreakfastrecommendationMin=ref();//早餐推荐
const BreakfastrecommendationMax=ref();//早餐推荐
const LunchrecommendationsMin=ref();//午餐推荐
const LunchrecommendationsMax=ref();//午餐推荐
const DinnerrecommendationMin=ref();//晚餐推荐
const DinnerrecommendationMax=ref();//晚餐推荐
const BreakfastList=ref([]);
const BreakfastAddList=ref([]);
const LunchList=ref([]);
const LunchAddList=ref([]);
const DinnerList=ref([]);
const DinnerAddList=ref([]);
const BMI=ref();
const Height_s = ref()
const Weight_s = ref()
  
  const groupId = ref()
  const id = ref()
  const popWrite = ref(false)
  const popWriteDirection = ref('ttb')
  const pageList = async () => {
    await router.push({ 'path': '/pageList/' + groupId.value })
  }
  const size = ref('150%')
  
  const formInline = ref({
    Fat: '',
    FatMin: '',
    FatMax: '',
    Bone: '',
    BoneMin: '',
    BoneMax: '',
    Protein: '',
    ProteinMin: '',
    ProteinMax: '',
    Water: '',
    WaterMin: '',
    WaterMax: '',
    LBM: '',
    ICW: '',
    Weight: '',
    WeightMin: '',
    WeightMax: '',
    Muscle: '',
    MuscleMin: '',
    MuscleMax: '',
    PBF: '',
    PBFMin: '',
    PBFMax: '',
    SMM: '',
    SMMMin: '',
    SMMMax: '',
    BMI: '',
    BMIMin: '',
    BMIMax: '',
    WHR: '',
    WHRMin: '',
    WHRMax: '',
    Weight_control: '',
    Fat_control: '',
    Muscle_control: '',
    VFI: '',
    VFIMin: '',
    VFIMax: '',
    Edema: '',
    EdemaMin: '',
    EdemaMax: '',
    ECW: '',
    BMR: '',
    name: '',
  })
  
  const onHome = async () => {
    await router.push({ 'path': '/Home' })
  }
  const radi1 = () => {
    total.value = parseInt(radio1.value) + parseInt(radio2.value) + parseInt(radio3.value) + parseInt(radio4.value);
  }
  const radi2 = () => {
    total.value = parseInt(radio1.value) + parseInt(radio2.value) + parseInt(radio3.value) + parseInt(radio4.value);
  }
  const radi3 = () => {
    total.value = parseInt(radio1.value) + parseInt(radio2.value) + parseInt(radio3.value) + parseInt(radio4.value);
  }
  const radi4 = () => {
    total.value = parseInt(radio1.value) + parseInt(radio2.value) + parseInt(radio3.value) + parseInt(radio4.value);
  }
  const onChange = async (index, value) => {
    list._rawValue[index].energy = (list._rawValue[index].single.energy * value).toFixed(2)
    list._rawValue[index].weight = (list._rawValue[index].single.weight * value).toFixed(2)
    list._rawValue[index].protein = (list._rawValue[index].single.protein * value).toFixed(2)
    list._rawValue[index].fat = (list._rawValue[index].single.fat * value).toFixed(2)
    list._rawValue[index].carbohydrate = (list._rawValue[index].single.carbohydrate * value).toFixed(2)
    list._rawValue[index].calcium = (list._rawValue[index].single.calcium * value).toFixed(2)
    list._rawValue[index].sodium = (list._rawValue[index].single.sodium * value).toFixed(2)
    list._rawValue[index].magnesium = (list._rawValue[index].single.magnesium * value).toFixed(2)
    list._rawValue[index].iron = (list._rawValue[index].single.iron * value).toFixed(2)
    list._rawValue[index].zinc = (list._rawValue[index].single.zinc * value).toFixed(2)
    list._rawValue[index].selenium = (list._rawValue[index].single.selenium * value).toFixed(2)
    list._rawValue[index].vitamin_a = (list._rawValue[index].single.vitamin_a * value).toFixed(2)
    list._rawValue[index].vitamin_e = (list._rawValue[index].single.vitamin_e * value).toFixed(2)
    list._rawValue[index].vitamin_b1 = (list._rawValue[index].single.vitamin_b1 * value).toFixed(2)
    list._rawValue[index].vitamin_b2 = (list._rawValue[index].single.vitamin_b2 * value).toFixed(2)
    list._rawValue[index].vitamin_c = (list._rawValue[index].single.vitamin_c * value).toFixed(2)
  
    energys.value = 0
    for (let i = 0; i < list._rawValue.length; i++) {
      energys.value += (list._rawValue[i].energy) * 1;
      console.log(list._rawValue[i].energy)
  
    }
  
  }
  
  const btn_fenxi = async () => {
    let params = {
      'id': reportId.value,
      'user_id': id.value,
      'diet_energy': energy._value,
      'diet': list._rawValue,
    }
  
 
  
    if (data.data.code == 0) {
      ElMessage.error(data.data.msg)
      return false;
    } else {
      const { href } = await router.resolve({
        path: "/Dietary/" + groupId.value + "/" + id.value + '/' + reportId.value
      });
      window.open(href, "_blank");
    }
  
  }
  
  const cancelClick = async () => {
    popWrite.value = false;
  }
  
  const confirmClick = async () => {
    Object.keys(formInline._rawValue).forEach(function (item, index) {
      //item 就是当日按循环到的对象
      //index是循环的索引，从0开始
      if (formInline._rawValue[item] == '') {
        ElMessage.error('必填项不能为空')
        return;
      }
      // console.log(formInline._rawValue[item]);
    })
  
  
  
    // for(let i = 0; i < Object.keys(formInline._rawValue).length; i++) {
    //   console.log(i);
    //   console.log(formInline._rawValue[i]);
    //   if (formInline.value[i] == '') {
    //     ElMessage.error('必填项不能为空')
    //     return false;
    //   }
    // }
  }
  
  const get_new = async () => {
    const res = await api.getFood();
  }
  
  // const handClick = async ()  => {
  //   console.log('手动输入体成分数据');
  // }
  
  const handClick = async () => {
    popWrite.value = true;
  }
  
  
  
  const appraisal = async () => {
    http.get('api/archives/analysis?id=' + id.value + '&type=analysis').then((res) => {
      if (res.data.code === 0) {
        ElMessage.error(res.data.msg)
      }
    })
  }
  
  const guanbi = async () => {
    tan.value = false;
    http.get('api/archives/analysis?id=' + id.value + '&type=cancel').then((res) => {
      if (res.data.code === 0) {
        ElMessage.error(res.data.msg)
      }
    })
  }
  
  const goto = async () => {
    const { href } = await router.resolve({
      path: "/analysis/" + groupId.value + "/" + id.value + "/" + reportId.value
    });
    window.open(href, "_blank");
  }
  
  
  const btn = async () => {
    // // 只要点击文档，那么就将数据保存起来
    http.get('api/archives/setReportStatus?reportId=' + reportId.value).then((res) => {
      if (res.data.code === 0) {
        ElMessage.error(res.data.msg)
        return false
      }
    })
    const { href } = await router.resolve({
      path: "/reportView/" + groupId.value + "/" + id.value + "/" + reportId.value
    });
    window.open(href, "_blank");
  }
  
  const fetchData = async () => {
    //获取医院名称
    Titlename.value = localStorage.getItem('Title');
    if (parseInt(radio1.value)) {
      total.value = parseInt(radio1.value) + parseInt(radio2.value) + parseInt(radio3.value) + parseInt(radio4.value);
    } else {
      total.value = 0;
    }
    //获取个人信息
    if (route.params.groupId) {
      groupId.value = route.params.groupId;
      id.value = route.params.id;
      reportId.value = route.params.reportId;
      username.value = route.params.username;
      guardian.value = route.params.guardian;
      birthStatus.value = route.params.birth;
      codeimg.value=window.localStorage.getItem('ercode')
  
      
      //获取二维码是否显示
    http.get('api/index/getAuth').then((res)=>{
        let aray=res.data.data;
        let array=aray.split(',');
        if(array.includes('12')){
          code_1.value='true'
        }else{
          code_1.value='false'
        }
      })
  
    

    }
    function getMonthsDifference(startDateStr, endDateStr) {
          const startDate = new Date(startDateStr);
          const endDate = new Date(endDateStr);

          // 确保开始日期早于结束日期
          if (startDate > endDate) {
              throw new Error('开始日期必须早于结束日期');
          }

          // 计算年份差
          let yearsDiff = endDate.getFullYear() - startDate.getFullYear();
          // 计算月份差
          let monthsDiff = endDate.getMonth() - startDate.getMonth();

          // 如果结束日期的月份小于开始日期的月份，说明跨年了，年份差减一，月份差加上一年的月份数
          if (monthsDiff < 0) {
              yearsDiff--;
              monthsDiff += 12;
          }

          // 合并年份差和月份差
          let totalMonthsDiff = yearsDiff * 12 + monthsDiff;

          return totalMonthsDiff;
      }
      let params = {
    'groupId': groupId.value,
    'id': id.value,
    'reportId': reportId.value,
    'username': username.value,
    'guardian': guardian.value,
    'birth': birth.value,
  }
  const data = await api.energy(params);
  if(data.data.data.packAge.length>0){
    BreakfastrecommendationMin.value=data.data.data.packAge[0].start_package*0.3;
    BreakfastrecommendationMax.value=data.data.data.packAge[0].end_package*0.3;
    LunchrecommendationsMin.value=data.data.data.packAge[0].start_package*0.4;
    LunchrecommendationsMax.value=data.data.data.packAge[0].end_package*0.4;
    DinnerrecommendationMin.value=data.data.data.packAge[0].start_package*0.3;
    DinnerrecommendationMax.value=data.data.data.packAge[0].end_package*0.3;

  }
    
      http.get("api/archives/viewReportMember?id=" + reportId.value + "&username=" + '' + "&guardian=" + '' + "&birth=" + '').then((res) => {
        if (res.data.data.times) {
          let parsedDate = new Date(res.data.data.times);
          let targetDateObj = new Date('2024-01-08');
          if (parsedDate < targetDateObj) {
            times.value = 1;
          } else if (parsedDate > targetDateObj) {
            times.value = 2;
          }
        }
        BMI.value = res.data.data.bmi;
        var bmi1 = '';
    var bmi2 = '';
    bmi1 = res.data.data.bmi;
    if (bmi1 < 18.5) {
      bmi2 = '偏瘦'
    } else if (bmi1 < 24 && bmi1 >= 18.5) {
      bmi2 = '正常'
    } else if (bmi1 < 28 && bmi1 >= 24) {
      bmi2 = '偏胖'
    } else if (bmi1 >= 28) {
      bmi2 = '肥胖'
    }
    let color2 = ["#D0443B", "#3EA4AA"];
    let xAxisData = ["偏瘦", "正常", "偏胖", "肥胖",];
    // var myChart = echarts.init(document.getElementById("myChart1"));
    // myChart.value = myChart;
    // myChart.setOption({
    //   backgroundColor: "#fff",
    //   color: color2,
    //   legend: {
    //     top: 20
    //   },
    //   tooltip: {
    //     trigger: "axis",
    //     formatter: function () {
    //       return "";
    //     }
    //   },
    //   grid: {
    //     top: 100,
    //     containLabel: true
    //   },
    //   xAxis: [
    //     {
    //       name: "",
    //       type: "category",
    //       boundaryGap: false,
    //       axisLabel: {
    //         formatter: "{value}",
    //         textStyle: {
    //           color: "#606266"
    //         }
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: "#E4E7ED"
    //         }
    //       },
    //       axisTick: {
    //         show: false // 刻度出来的尖尖
    //       },
    //       splitLine: {
    //         show: true,
    //         lineStyle: {
    //           color: ["#E4E7ED"],
    //           width: 1,
    //           type: "solid"
    //         }
    //       },
    //       axisPointer: {
    //         lineStyle: {
    //           color: "#DCDFE6" //坐标轴指示线
    //         },
    //         show: true //不坐标轴指示线
    //       },
    //       nameTextStyle: {
    //         color: "#606266",
    //         fontSize: 12,
    //         lineHeight: 40,
    //         padding: [0, 0, 0, -15]
    //       },
    //       data: xAxisData
    //     }
    //   ],
    //   yAxis: [
    //     {
    //       type: "value",
    //       name: "BMI值",
    //       axisLabel: {
    //         textStyle: {
    //           color: "#606266"
    //         }
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: "#E4E7ED"
    //         }
    //       },
    //       axisTick: {
    //         show: false // 刻度出来的尖尖
    //       },
    //       splitLine: {
    //         show: true,
    //         lineStyle: {
    //           color: ["#E4E7ED"],
    //           width: 1,
    //           type: "solid"
    //         }
    //       },
    //       axisPointer: {
    //         lineStyle: {
    //           color: "#DCDFE6" //坐标轴指示线
    //         },
    //         show: true //不坐标轴指示线
    //       },
    //       nameTextStyle: {
    //         color: "#606266",
    //         fontSize: 12,
    //         lineHeight: 40
    //       }
    //     }
    //   ],
    //   series: [
    //     {
    //       // name: "2018",
    //       name: "国际",
    //       type: "line",
    //       smooth: true,
    //       symbolSize: 8,
    //       zlevel: 3,
    //       lineStyle: {
    //         normal: {
    //           color: color2[0]
    //         }
    //       },
    //       symbol: "circle", //数据交叉点样式
    //       // itemStyle: {
    //       //     normal: {
    //       //         color: "white",
    //       //         borderColor: '#D0443B',
    //       //         borderWidth: 1,
    //       //     }
    //       // },
    //       data: [0, 18.5, 24.0, 28.0]
    //     },
    //     {
    //       name: "我的",
    //       type: "scatter",
    //       smooth: true,
    //       symbolSize: 8,
    //       zlevel: 3,
    //       lineStyle: {
    //         normal: {
    //           color: color2[1]
    //         }
    //       },
    //       symbol: "circle", //数据交叉点样式 (实心点)
    //       // itemStyle: {
    //       //     normal: {
    //       //         color: "#ffffff",
    //       //         borderColor: '#3EA4AA',
    //       //         borderWidth: 1,
    //       //     }
    //       // },
    //       data: [[`${bmi2}`, `${bmi1}`]]
    //     }
    //   ]
    // });
    // window.addEventListener("resize", function () {
    //   myChart.resize();
    // });
        
        if (res.data.code === 0) {
          ElMessage.error(res.data.msg);
        }
        report_time.value = res.data.data.times;
       
        birth.value = res.data.data.contents.birth;
        const startDateStr = res.data.data.contents.birth;
        const endDateStr = new Date().toISOString().split('T')[0];
        monthsDifference.value=getMonthsDifference(startDateStr, endDateStr);
        


     

  for (let i = 0; i < data.data.data.diet_analysis.length; i++) {
    switch (i) {
      case 0:
        data.data.data.diet_analysis[i]['pName'] = '周一';
        break
      case 1:
        data.data.data.diet_analysis[i]['pName'] = '周二';
        break
      case 2:
        data.data.data.diet_analysis[i]['pName'] = '周三';
        break
      case 3:
        data.data.data.diet_analysis[i]['pName'] = '周四';
        break
      case 4:
        data.data.data.diet_analysis[i]['pName'] = '周五';
        break
      case 5:
        data.data.data.diet_analysis[i]['pName'] = '周六';
        break
      case 6:
        data.data.data.diet_analysis[i]['pName'] = '周日';
        break
    }
  }
        diet_analysis.value=data.data.data.diet_analysis;
        // diet_analysis.value = data.data.data.diet_analysis.filter(
        //   (item, index) => index < 4
        // );
        // diet_analysis1.value = data.data.data.diet_analysis.filter(
        //   (item, index) => index >= 4
        // );
        
      });
      //修改菜谱元素为空的值为0
      function fillEmptyValuesWithZero(arr) {
        // 遍历数组中的每个对象
        arr.forEach(function(obj) {
            // 检查蛋白质属性
            if (obj.hasOwnProperty('protein') && (!obj.protein || obj.protein === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.protein = '0';
            }
            // 检查碳水化合物属性
            if (obj.hasOwnProperty('carbohydrate') && (!obj.carbohydrate || obj.carbohydrate === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.carbohydrate = '0';
            }
            // 检查脂肪
            if (obj.hasOwnProperty('fat') && (!obj.fat || obj.fat === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.fat = '0';
            }
            // 检查钙
            if (obj.hasOwnProperty('calcium') && (!obj.calcium || obj.calcium === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.calcium = '0';
            }
             // 检查钠
             if (obj.hasOwnProperty('sodium') && (!obj.sodium || obj.sodium === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.sodium = '0';
            }
            // 检查镁
            if (obj.hasOwnProperty('magnesium') && (!obj.magnesium || obj.magnesium === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.magnesium = '0';
            }
             // 检查铁
             if (obj.hasOwnProperty('iron') && (!obj.iron || obj.iron === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.iron = '0';
            }
             // 检查锌
             if (obj.hasOwnProperty('zinc') && (!obj.zinc || obj.zinc === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.zinc = '0';
            }
             // 检查硒
             if (obj.hasOwnProperty('selenium') && (!obj.selenium || obj.selenium === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.selenium = '0';
            }
             // 检查维生素a
             if (obj.hasOwnProperty('vitamin_a') && (!obj.vitamin_a || obj.vitamin_a === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.vitamin_a = '0';
            }
             // 检查维生素e
             if (obj.hasOwnProperty('vitamin_e') && (!obj.vitamin_e || obj.vitamin_e === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.vitamin_e = '0';
            }
             // 检查维生素b1
             if (obj.hasOwnProperty('vitamin_b1') && (!obj.vitamin_b1 || obj.vitamin_b1 === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.vitamin_b1 = '0';
            }
            // 检查维生素b2
            if (obj.hasOwnProperty('vitamin_b2') && (!obj.vitamin_b2 || obj.vitamin_b2 === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.vitamin_b2 = '0';
            }
             // 检查维生素c
             if (obj.hasOwnProperty('vitamin_c') && (!obj.vitamin_c || obj.vitamin_c === '')) {
                // 如果值为null、undefined、空字符串或空数组（这里只检查前三种情况）
                obj.vitamin_c = '0';
            }
        });

            // 返回修改后的数组（实际上你可以直接修改原数组，这里返回只是示例）
            return arr;
     }


    http.get('api/archives/viewreport?id=' + reportId.value + '&username=' + '' + '&guardian=' + '' + '&birth=' +'').then((res) => {
      
      pagoda.value = res.data.data.pagoda;
      contents.value = res.data.data.contents;
      Diseaseanalysis.value = res.data.data.FoodDiseaseintervention;
          if (res.data.data.contents.water) {
            pagoda.value[0].product_energy = parseFloat(res.data.data.contents.water);
        }
        for(let i=0;i<res.data.data.diet.filter(item=>item.single.checkList=='早餐').length;i++){
        Breakfastenergy.value=Breakfastenergy.value+ Number(res.data.data.diet.filter(item=>item.single.checkList=='早餐')[i].energy)
        BreakfastList.value=res.data.data.diet.filter(item=>item.single.checkList=='早餐')
        let arrs=res.data.data.diet.filter(item=>item.single.checkList=='早餐')
        BreakfastList.value=fillEmptyValuesWithZero(arrs)
        BreakfastLists.value=res.data.data.diet.filter(item=>item.single.checkList=='早餐').length
        let arrs2=res.data.data.diet.filter(item=>item.single.checkList=='早加餐')
         BreakfastAddList.value=fillEmptyValuesWithZero(arrs2)
      }
      for(let i=0;i<res.data.data.diet.filter(item=>item.single.checkList=='午餐').length;i++){
        Lunchenergy.value=Lunchenergy.value+ Number(res.data.data.diet.filter(item=>item.single.checkList=='午餐')[i].energy)
        let arrs1=res.data.data.diet.filter(item=>item.single.checkList=='午餐')
        LunchList.value= fillEmptyValuesWithZero(arrs1)
        LunchLists.value=res.data.data.diet.filter(item=>item.single.checkList=='午餐').length
        let arrs4=res.data.data.diet.filter(item=>item.single.checkList=='午加餐')
      LunchAddList.value=fillEmptyValuesWithZero(arrs4)
      }
      
      for(let i=0;i<res.data.data.diet.filter(item=>item.single.checkList=='晚餐').length;i++){
        Dinnerenergy.value=Dinnerenergy.value+ Number(res.data.data.diet.filter(item=>item.single.checkList=='晚餐')[i].energy)
        let arrs2=res.data.data.diet.filter(item=>item.single.checkList=='晚餐')
        DinnerList.value=fillEmptyValuesWithZero(arrs2)
        DinnerLists.value=res.data.data.diet.filter(item=>item.single.checkList=='晚餐').length
        let arrs6=res.data.data.diet.filter(item=>item.single.checkList=='晚加餐')
      DinnerAddList.value=fillEmptyValuesWithZero(arrs6)

      }
      console.log( Breakfastenergy.value,'早餐能量')
      let color = ["#3EA4AA"];
    let color1 = ["#D0443B", "#3EA4AA"];
    let color2 = ["#D0443B", "#3EA4AA"];
    var arr = [];
    var arr2 = [];
    var parr = res.data.data.primaryHeight;
    if (res.data.data.primaryHeight) {
      for (let i = 0; i < parr.length; i++) {
        arr.push(parr[i].content);
        arr2.push(parr[i].month);
      }
    }

    //获取用户生日 用户出生到现在的月份
    const startDate = new Date(res.data.data.contents.birth);
    const endDate = new Date();
    let monthsDifference = (endDate.getMonth() + 1) - startDate.getMonth();
    if (endDate.getFullYear() > startDate.getFullYear()) {
      monthsDifference += 12 * (endDate.getFullYear() - startDate.getFullYear());
    }
    //获取月份对应的下标以及身高
    let months = monthsDifference;
    let result = arr2.indexOf(months);
    if (result !== -1) {
      Height_s.value = arr[result];
    } else {
      let results = arr2.findIndex(num => num > months);
      let ress = arr[results - 1];
      let ress1 = arr[results];
      Height_s.value = ((arr[results]) / 2) + ((arr[results - 1]) / 2);

    }


    var arr1 = [];
    var arr3 = [];
    var arr4 = [];
    var indexes = '';
    var parr1 = res.data.data.primaryWeight;

    if (res.data.data.primaryWeight) {
      for (let i = 0; i < parr1.length; i++) {
        arr1.push(parr1[i].content);
        arr3.push(parr1[i].month);
      }
    }


    arr4 = arr3.filter((item, index) => {
      return parseInt(item) > parseInt(res.data.data.sumbirths)
    })
    for (let i = 0; i < arr3.length; i++) {
      if (arr3[i] == arr4[0]) {
        indexes = i
      }
    }

    let result1 = arr3.indexOf(months);
    if (result1 !== -1) {
      Weight_s.value = arr1[result1];
    } else {
      let results1 = arr2.findIndex(num => num > months);
      Weight_s.value = Math.round(((arr1[results1]) / 2) + ((arr1[results1 - 1]) / 2));

    }

    // var myChart1 = echarts.init(document.getElementById("myChart2"));
    // myChart1.value = myChart1;
    // myChart1.setOption({
    //   backgroundColor: "#fff",
    //   color: color2,
    //   legend: {
    //     top: 20
    //   },
    //   tooltip: {
    //     trigger: "axis",
    //     formatter: function () {
    //       return "";
    //     }
    //   },
    //   grid: {
    //     top: 100,
    //     containLabel: true
    //   },
    //   xAxis: [
    //     {
    //       name: "月份",
    //       type: "category",
    //       boundaryGap: false,
    //       axisLabel: {
    //         formatter: "{value}",
    //         textStyle: {
    //           color: "#606266"
    //         }
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: "#E4E7ED"
    //         }
    //       },
    //       axisTick: {
    //         show: false // 刻度出来的尖尖
    //       },
    //       splitLine: {
    //         show: true,
    //         lineStyle: {
    //           color: ["#E4E7ED"],
    //           width: 1,
    //           type: "solid"
    //         }
    //       },
    //       axisPointer: {
    //         lineStyle: {
    //           color: "#DCDFE6" //坐标轴指示线
    //         },
    //         show: true //不坐标轴指示线
    //       },
    //       nameTextStyle: {
    //         color: "#606266",
    //         fontSize: 12,
    //         lineHeight: 40,
    //         padding: [0, 0, 0, -15]
    //       },
    //       data: arr3
    //     }
    //   ],
    //   yAxis: [
    //     {
    //       type: "value",
    //       name: "身高",
    //       axisLabel: {
    //         textStyle: {
    //           color: "#606266"
    //         }
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: "#E4E7ED"
    //         }
    //       },
    //       axisTick: {
    //         show: false // 刻度出来的尖尖
    //       },
    //       splitLine: {
    //         show: true,
    //         lineStyle: {
    //           color: ["#E4E7ED"],
    //           width: 1,
    //           type: "solid"
    //         }
    //       },
    //       axisPointer: {
    //         lineStyle: {
    //           color: "#DCDFE6" //坐标轴指示线
    //         },
    //         show: true //不坐标轴指示线
    //       },
    //       nameTextStyle: {
    //         color: "#606266",
    //         fontSize: 12,
    //         lineHeight: 40
    //       }
    //     }
    //   ],
    //   series: [
    //     {
    //       // name: "2018",
    //       name: "国际",
    //       type: "line",
    //       smooth: true,
    //       symbolSize: 8,
    //       zlevel: 3,
    //       lineStyle: {
    //         normal: {
    //           color: color2[0]
    //         }
    //       },
    //       symbol: "circle", //数据交叉点样式
    //       // itemStyle: {
    //       //     normal: {
    //       //         color: "white",
    //       //         borderColor: '#D0443B',
    //       //         borderWidth: 1,
    //       //     }
    //       // },
    //       data: arr
    //     },
    //     {
    //       name: "我的",
    //       type: "scatter",
    //       smooth: true,
    //       symbolSize: 8,
    //       zlevel: 3,
    //       lineStyle: {
    //         normal: {
    //           color: color2[1]
    //         }
    //       },
    //       symbol: "circle", //数据交叉点样式 (实心点)
    //       // itemStyle: {
    //       //     normal: {
    //       //         color: "#ffffff",
    //       //         borderColor: '#3EA4AA',
    //       //         borderWidth: 1,
    //       //     }
    //       // },
    //       data: [[arr3[indexes - 1], res.data.data.sumHeight]]
    //     }
    //   ]
    // });
    // window.addEventListener("resize", function () {
    //   myChart1.resize();
    // });

    // var myChart2 = echarts.init(document.getElementById("myChart3"));
    // myChart2.value = myChart2;
    // myChart2.setOption({
    //   backgroundColor: "#fff",
    //   color: color2,
    //   legend: {
    //     top: 20
    //   },
    //   tooltip: {
    //     trigger: "axis",
    //     formatter: function () {
    //       return "";
    //     }
    //   },
    //   grid: {
    //     top: 100,
    //     containLabel: true
    //   },
    //   xAxis: [
    //     {
    //       name: "月份",
    //       type: "category",
    //       boundaryGap: false,
    //       axisLabel: {
    //         formatter: "{value}",
    //         textStyle: {
    //           color: "#606266"
    //         }
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: "#E4E7ED"
    //         }
    //       },
    //       axisTick: {
    //         show: false // 刻度出来的尖尖
    //       },
    //       splitLine: {
    //         show: true,
    //         lineStyle: {
    //           color: ["#E4E7ED"],
    //           width: 1,
    //           type: "solid"
    //         }
    //       },
    //       axisPointer: {
    //         lineStyle: {
    //           color: "#DCDFE6" //坐标轴指示线
    //         },
    //         show: true //不坐标轴指示线
    //       },
    //       nameTextStyle: {
    //         color: "#606266",
    //         fontSize: 12,
    //         lineHeight: 40,
    //         padding: [0, 0, 0, -15]
    //       },
    //       data: arr3
    //     }
    //   ],
    //   yAxis: [
    //     {
    //       type: "value",
    //       name: "体重",
    //       axisLabel: {
    //         textStyle: {
    //           color: "#606266"
    //         }
    //       },
    //       axisLine: {
    //         lineStyle: {
    //           color: "#E4E7ED"
    //         }
    //       },
    //       axisTick: {
    //         show: false // 刻度出来的尖尖
    //       },
    //       splitLine: {
    //         show: true,
    //         lineStyle: {
    //           color: ["#E4E7ED"],
    //           width: 1,
    //           type: "solid"
    //         }
    //       },
    //       axisPointer: {
    //         lineStyle: {
    //           color: "#DCDFE6" //坐标轴指示线
    //         },
    //         show: true //不坐标轴指示线
    //       },
    //       nameTextStyle: {
    //         color: "#606266",
    //         fontSize: 12,
    //         lineHeight: 40
    //       }
    //     }
    //   ],
    //   series: [
    //     {
    //       // name: "2018",
    //       name: "国际",
    //       type: "line",
    //       smooth: true,
    //       symbolSize: 8,
    //       zlevel: 3,
    //       lineStyle: {
    //         normal: {
    //           color: color2[0]
    //         }
    //       },
    //       symbol: "circle", //数据交叉点样式
    //       // itemStyle: {
    //       //     normal: {
    //       //         color: "white",
    //       //         borderColor: '#D0443B',
    //       //         borderWidth: 1,
    //       //     }
    //       // },
    //       data: arr1
    //     },
    //     {
    //       name: "我的",
    //       type: "scatter",
    //       smooth: true,
    //       symbolSize: 8,
    //       zlevel: 3,
    //       lineStyle: {
    //         normal: {
    //           color: color2[1]
    //         }
    //       },
    //       symbol: "circle", //数据交叉点样式 (实心点)
    //       // itemStyle: {
    //       //     normal: {
    //       //         color: "#ffffff",
    //       //         borderColor: '#3EA4AA',
    //       //         borderWidth: 1,
    //       //     }
    //       // },
    //       data: [[arr3[indexes - 1], res.data.data.sumWeight]]
    //     }
    //   ]
    // });
    // window.addEventListener("resize", function () {
    //   myChart2.resize();
    // });


    })
  
  
    if (route.params.groupId) {
      groupId.value = route.params.groupId
      id.value = route.params.id
      reportId.value = route.params.reportId
      if (groupId.value == 3) {
        labName.value = '婴幼儿营养测评'
      } else if (groupId.value == 5) {
        labName.value = '孕产妇营养测评'
      } else if (groupId.value == 6) {
        labName.value = '成年人营养测评'
      } else if (groupId.value == 7) {
        labName.value = '慢性病营养测评'
      } else if (groupId.value == 8) {
        labName.value = '团体营养测评'
      }
      //获取个人信息
      http.get('api/archives/evaluating?id=' + id.value).then((res) => {
        userinfo.value = res.data.data;
      })
      
     
      setTimeout(() => {
          print("#pdfDom1");
        }, 3000);
    } else {
      ElMessage.error('栏目编号不得为空')
      await router.push({ 'path': '/Home' })
    }
  
  }
  
  onMounted(() => {
    fetchData()
  })
  </script>
<style scoped>
  .biao1 {
    width: 25%;
    border-bottom: 1px solid rgb(9, 165, 120);
    border-right: 1px solid rgb(9, 165, 120);
    background-color: rgb(42, 178, 139);
    color: #fff;
  }
  
  .biao5 {
    width: 25%;
    border-right: 1px solid rgb(9, 165, 120);
    background-color: rgb(42, 178, 139);
    color: #fff;
  }
  
  .biao6 {
    width: 25%;
    border-right: 1px solid rgb(9, 165, 120);
    color: #000;
  }
  
  .biao2 {
    width: 25%;
    border-bottom: 1px solid rgb(9, 165, 120);
    border-right: 1px solid rgb(9, 165, 120);
    color: #000;
  }
  
  .biao3 {
    width: 25%;
    border-bottom: 1px solid rgb(9, 165, 120);
    background-color: rgb(42, 178, 139);
    color: #fff;
  }
  
  .biao4 {
    width: 75%;
    border-bottom: 1px solid rgb(9, 165, 120);
    color: #000;
  }
  
  .biao7 {
    border-right: 1px solid rgb(9, 165, 120);
    border-bottom: 1px solid rgb(9, 165, 120);
  }
  
  #proposal {
    width: 1075px;
    height: 456px;
    background: url(".././assets/img/report_proposal.png");
  }
  
  /deep/ #elTextThree {
    width: 100%;
  }
  
  /deep/.el-textarea__inner {
    width: 946px;
    height: 157px;
    border-radius: 30px;
    border: 1px solid #2ab28b;
  }
  
  /deep/.el-textarea__inner .red {
    width: 946px;
    height: 157px;
    border-radius: 30px;
    border: 1px solid #2ab28b;
  }
  
  #elTextTwo {
    background: #2ab28b;
  }
  
  /deep/.el-textarea {
    width: 80%;
    margin-left: 70px;
  }
  
  .params {
    width: 100%;
    font-size: 22px;
    font-weight: bold;
  }
  
  .shu {
    width: 5px;
    height: 30px;
    background: #2ab28b;
    opacity: 1;
    border-radius: 100px;
    float: left;
    margin-right: 2%;
    margin-left: 5%;
  }
  
  .shured {
    width: 5px;
    height: 30px;
    background: red;
    opacity: 1;
    border-radius: 100px;
    float: left;
    margin-right: 2%;
    margin-left: 5%;
  }
  
  .right-box-card {
    width: 100%;
    margin-left: 0%;
  }
  
  .el-card.is-always-shadow {
    box-shadow: none;
  }
  
  .el-card {
    border: none;
  }
  
  .report {
    /*width: 595px;*/
    /*height: 842px;*/
  }
  
  .titles {
    margin-right: 20px;
  }
  
  #basic .title {
    font-size: 36px;
    width: 100%;
    text-align: center;
    height: 100px;
    margin-top: 100px;
  }
  
  #basic #createTime {
    font-size: 16px;
    color: #999999;
    margin-left: 70%;
  }
  
  .subTitle {
    font-size: 30px;
    text-align: center;
    height: 40px;
    color: #2ab28b;
    /*border-bottom: 1px dashed  red;*/
  }
  
  #two {
    width: 1075px;
    height: 1244px;
    border-left: 1px #999999 solid;
    border-right: 1px #999999 solid;
    margin: 0 auto 0 auto;
  }
  
  #basic {
    font-size: 16px;
    width: 1075px;
    min-height: 1244px;
    overflow: hidden;
    padding: 0;
    word-break: break-all;
    /*margin: 60px auto 0 auto;*/
    box-shadow: var(--el-box-shadow-light);
    border-radius: var(--el-card-border-radius);
    background-color: var(--el-card-bg-color);
    /* color: var(--el-text-color-primary); */
    transition: var(--el-transition-duration);
    --el-card-border-color: var(--el-border-color-light, #ebeef5);
    --el-card-border-radius: 4px;
    --el-card-padding: 20px;
    --el-card-bg-color: var(--el-color-white);
  }
  
  #basic .symptom_title {
    font-size: 20px;
    margin-top: 30px;
  }
  
  .every {
    height: 55px;
    line-height: 55px;
    width: 23%;
    float: left;
    margin-left: 10%;
    font-weight: bold;
  }
  
  #basic .symptom {
    text-align: left;
    line-height: 35px;
  }
  
  #basic .symptom .every {
    width: 30%;
    float: left;
    margin-left: 2%;
  }
  
  .symptom_content {
    width: 100%;
    float: left;
    margin-left: 120px;
  }
  
  .service_plate {
    background: url(".././assets/img/evaluaction_service_plate.png") center no-repeat;
  }
  
  .dietOn {
    width: 100%;
    /* height: 510px; */
    /* margin-top:90px; */
    /* margin-top:150px; */
    padding-top: 20px;
    /* padding-bottom: 60px; */
  }
  
  .everyRed {
    color: red;
  }
  
  .everyOrange {
    color: orange;
  }
  
  .everyBlack {
    color: #333333;
  }
  
  .time-botton {
    background-color: #2ab28b;
    width: 108px;
    height: 41px;
    color: #fff;
    font-size: 16px;
    border-radius: 100px;
    line-height: 41px;
    margin: 42px 0 0 40px;
    text-align: center;
  }
  
  .time-type {
    width: 58px;
    height: 58px;
    line-height: 58px;
    text-align: center;
    background: #85ce61;
    border-radius: 50%;
    opacity: 1;
    color: #fff;
    box-shadow: 5px 5px 2px #888888;
    margin: 20px 0 20px 40%;
  }
  
  .der {
    width: 240px;
    height: 174px;
    background: url(".././assets/img/evaluaction_service_plate.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin: auto;
  }
  
  .platesFoods {
    margin-top: 5px;
    margin-left: 8px;
    color: #333333;
    font-size: 14px;
    text-align: center;
  }
  
  .platesFoods div {
    padding-bottom: 5px;
  }
  
  .platesFoods span {
    color: #666666;
  }
  
  .plates {
    width: 33%;
    float: left;
  }
  
  .plates .plates-top-img {
    float: left;
    margin-left: 1%;
    width: 30%;
  }
  
  .time-left-color {
    background: #85ce61;
  }
  
  .time-common-color {
    background: #e8b973;
  }
  
  .time-right-color {
    background: #6ea9e0;
  }
  </style>
        
    